
package com.dps.omc.service;
import com.dps.omc.enumer.EnumTeam;
import com.dps.omc.model.*;
import com.dps.omc.task.message.EnumTaskState;
import com.dps.common.service.IBaseService;
import com.dps.common.service.IPageService;
import com.dps.omc.dao.ITaskDAO;

import java.util.Date;
import java.util.List;

public interface ITaskService extends IBaseService<ITaskDAO,Task>,IPageService<ITaskDAO,Task>{

    public Task create(Job job, JobArtifact jobArtifact, Agent agent, AgentNode agentNode, int seq, User lastModified);
    public Task add(Task task,User lastModified);
    public void update(Task task,User lastModified);

    public boolean allFinish(Job job);
    public List<Task> findUnfinishAndExpiredByJob(Job job);
    public List<Task> findNewByJob(Job job);
    public List<Task> findNewByJobAndTeam(Job job,EnumTeam team);
    public List<Task> findListByJobId(String jobId);

    public List<Task> queryByStatusAndStartDate(EnumTaskState status, Date queryDate);

}